<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title><%= @page_title || "WikiPortal" %></title>
  <%= content_tag "style", @style_additions, :type => "text/css" %>
  <%= stylesheet_link_tag 'layout' %>
  <%= javascript_include_tag :defaults %>
  <%= auto_discovery_link_tag(:rss, {:controller=> 'page', :action => 'feed'}) %>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-268149-2";
urchinTracker();
</script>
<script>
  window.onload = function() {
    new Ajax.Updater( 'loginBox', '<%= "/user/loginbox" %>');
    new Ajax.Updater( 'view_count', '<%= "/user/view_count?c=#{controller.controller_name}&a=#{controller.action_name}&id=#{params[:id]}" %>');
  }
</script>

</head>
<body>
  <div id="Header">
    <div class="topBar">
      <div class="topBarTitle">
        <%= link_to "WikiPortal", 
          :controller => "/space",
          :action => "show_month" %>
      </div>
      <div class="searchForm">
        <%= start_form_tag :action => 'search' %>
          <%= text_field 'search', 'query', :size=>15 %>
          <%= submit_tag '搜索' %>
        <%= end_form_tag %>
      </div>
      <div class="cleared">&nbsp;</div>
    </div>
    <span id="view_count"></span>

    <div class="loginBox" id="loginBox">
      <%= link_to "现在登录", :controller => "/active_rbac/login" %>
      | <%= link_to "注册", :controller => "/active_rbac/registration" %>
    </div>
  </div>

  <div class="cleared">&nbsp;</div>
  <p style="color: green"><%= flash[:notice] %></p>
    <div id="Content">
      <%= @content_for_layout %> 
    </div>
  <div class="cleared">&nbsp;</div>

<div id="poweredby" class="smalltext">
  Powered by <%= image_tag "ruby_on_rails.gif", :border=>0 %>.Copyright &copy; 2006, <a href="mailto:SimonLei@gmail.com">SimonLei</a>
</div>
</body>
</html>

